package org.yh.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yh.dao.master.UserMapper;
import org.yh.model.User;

@Service
public class MasterService {

	@Autowired
	UserMapper userMapper;

	public Integer addUser(String name, Integer age, String sex) {
		User u = User.builder().name(name).age(age).sex(sex).build();
		int i = userMapper.insertSelective(u);
		return i;
	}
}
